﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>

<%
	dim nid,tilte,hr,we0,we,sou,dao,zi,zi0,body,dat,dat1,pl
        nid=Request.querystring("nid")
	if nid="" then nid=qingtian.nid 
	if not isnumeric(nid) then nid=qingtian.nid
	nid=clng(nid)
        id=Request.querystring("id")
	if id="" then id=1
	if not isnumeric(id) then id=1
	id=clng(id)
        page=Request.querystring("page")
	if page="" then page=1
	if not isnumeric(page) then page=1
	page=clng(page)

if nid=qingtian.nid then
tilte="相片评论"
else
tilte="相片评论出错"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM qingtian_user where id="&nid,conn,1,1
if rs.eof then
  Response.Redirect "login.asp?v=" & v & "&fv=" & fv & "&url=space.asp?sid="&sidd&"@@urls="&urls
end if
  rs.close
  set rs=Nothing
end if
select case v
case "0"
we0="<br/>"
hr="----------------<br/>"
book="<input name=""pl"" type=""text"" maxlength=""300"" value="""" /><br/><anchor title=""发表"">发表评论<go href='photobbscl.asp?id="&id&"&amp;nid="&nid&"&amp;sid="&sidd&"' method='post'><postfield name=""pl"" value=""$(pl)"" /></go></anchor><br/>"&hr&""
%>
<card title="<%=tilte%>"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
book=""&dao&"<form action=""photobbscl.asp?id="&id&"&amp;nid="&nid&"&amp;sid="&sidd&""" method=""post""><input type=""text"" name=""pl"" value="""" /><br/><input type=""submit"" value=""发表评论"" /></form>"&we0&""
%>
<title><%=tilte%></title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
%>
<%
		if sid<>"Null" then
		qingtian.info
		end if
response.write qingtian.qingsav("557")
Response.Write(""&dao&"<b><a href=""/user/spacev.asp?nid="&nid&"&amp;sid="&sidd&""">"&qingtian.utf8(qingtian.name(nid))&"的空间</a>&gt;<a href=""photoview.asp?id="&id&"&amp;nid="&nid&"&amp;sid="&sidd&""">相片阅读</a>&gt;回复</b>"&we0&""&hr&"")
response.write book
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from qingtian_photopl where photoid="&id&" order by id desc",conn,1,1
If Not rs.eof Then
	Dim PageSize,i
	PageSize=10				
	Dim Count,page,pagecount,gopage			
	gopage="photobbs.asp?id="&id&"&amp;nid="&nid&"&amp;sid="&sidd&"&amp;"
	Count=conn.execute("Select count(ID) from [qingtian_photopl] where photoid="&id&"")(0)		
	pagecount=(count+pagesize-1)\pagesize	
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize						
	If rs.eof Then Exit For	
response.write ""&we&""&i+(page-1)*PageSize&"."

response.write"<a href=""/user/spacev.asp?nid="&rs("userid")&"&amp;sid="&sidd&""">"&qingtian.utf8(rs("pluser"))&"</a>:"

response.write rs("photopl")&we0&sou&"["&rs("times")&"]"&we0
rs.moveNext							
	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
Else
response.write we&"没有评论！"&we0
end if
rs.close
set rs=nothing
response.write qingtian.qingsav("557")
	response.write hr
	response.write(""&we&"<a href=""photoview.asp?id="&id&"&amp;nid="&nid&"&amp;sid="&sidd&""">返回相片阅读</a>"&we0&"")
%>
 
<%
End Function
%>
